package com.atguigu.validator.three;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class TestUser {
    public static void main(String[] args) {
        ApplicationContext context =
                new AnnotationConfigApplicationContext(ValidationConfig.class);
        MyService bean = context.getBean(MyService.class);
        User user = new User();
        user.setName("ww");
        user.setAge(20);
        user.setPhone("13711465199");
        user.setMessage("sss sss");
        bean.testMethod(user);
        System.out.println(bean);

    }
}
